<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:p="http://primefaces.prime.com.tr/ui">

<f:subview id="cadastroAula">
	<ui:composition template="/WEB-INF/layout/template.xhtml">
		<ui:define name="conteudo">
	<h:form>
	
	  <p:panel header="Cadastro de Aluno" id="panelCadastroAluno" style="width: 550px;">


		<h:panelGrid columns="2">
			<h:outputLabel value="Conteudo:" for="input-aula-conteudo" />
			<h:inputText id="input-aula-conteudo" value="#{aulaBean.aula.conteudo}" />
			
			<h:outputLabel value="Data:" />
			<p:calendar  value="#{aulaBean.aula.data}" />
				
				
			<h:outputLabel value="Inicio:" for="input-aula-inicio" />
			<h:inputText id="input-aula-inicio" value="#{aulaBean.aula.inicio}" />
			
			<h:outputLabel value="Termino:" for="input-aula-termino" />
			<h:inputText id="input-aula-termino" value="#{aulaBean.aula.fim}" />
							
			<h:outputLabel value="Disciplina:" for="input-disciplina-nome" />
			<h:inputText id="input-disciplina-nome" value="#{aulaBean.disciplina.nome}" />			
			
			
			<h:outputLabel value="Alunos"/>
			<h:outputLabel rendered="#{loginBean.indAluno}"  value="#{aulaBean.aluno.login}" />	
			<p:pickList rendered="#{not loginBean.indAluno}" value="#{aulaBean.alunos}"  
                var="aluno"  
                itemLabel="#{aluno}"  
                itemValue="#{aluno}" /> 
                
			<h:commandButton action="#{aulaBean.incluirAula}" value="Incluir" />
			<h:commandButton action="home" value="cancelar" />			
		</h:panelGrid>
		</p:panel>
	</h:form>
	</ui:define>
	</ui:composition>
	</f:subview>
</html>